1. Field of the Invention
The present invention relates to an image processing apparatus, an image processing method, a computer-readable recording medium, and a program and particularly to motion vector search processing.
2. Related Background Art
Conventionally, a block matching method is frequently used as a motion vector search method in a motion compensation inter-frame prediction coding method. This block matching method includes matching a motion search block (N×N pixel area) with an image within a limited search range in a reference image at every position on a pixel basis, calculating a matching evaluation function, and determining the best matching position to be a search motion vector.
As the matching evaluation function, a sum of absolute values of differences between pixel values, obtained on a pixel to pixel basis all pixels in the block (the sum of absolute difference) is used for example.
The block matching method, however, has a problem that if the system is realized, an enormous amount of calculation is required due to a high frequency of a search, while it is useful to search for a vector having the highest degree of similarity within the search range. Therefore, there are suggested various simplification technics such as a method of searching with multiple steps (it is referred to as 3-step search method: refer to “Motion Compensation Inter-frame Coding of Conference Television Signals” (Technical Report of IEICE IE81-54 1981-7), for example).
In the 3-step search method, first, a search is made at rough search-point intervals as the first step and then the second search is made at search-point intervals each of which is a half of the interval for the first step around the best matching position, instead of the all-pixel position search. The same process is repeated in a plurality of steps to narrow the coarse search-point intervals to close ones, thereby searching for a motion vector.
As mentioned above, the block matching method requires an enormous amount of calculation. Although the 3-step search method is useful to reduce the amount of calculation remarkably in comparison with matching all search ranges one by one, it causes a user to find out a motion vector quite different from those in the originally required direction if he/she makes an incorrect search in the first step.
Furthermore, supposing that a moving area is an area moving in a frame and that a static area is an area remains stationary therein, it should be noted that each area is apt to be fixed in a single animation sequence due to the usage, as to a lot of types of images on a low-speed line for a videophone, a video conference, or the like.